Typically, files are stored on a data storage system, such as a hard disk, solid-state drive, or hybrid drive. The files are written using file system data structures using logical blocks that are understood by the operating system of a host. The logical blocks are then mapped to a physical location on the data storage device. Conventionally, the logical blocks are a relatively small size, such as 4 k. Accordingly, a file is broken down into a plurality of blocks when stored.
The operating system will organize files on the disk, such as, file names and the sequence of physical locations on the disk areas that hold the file. One problem with breaking down a file from a host into small blocks is fragmentation. Fragmentation is a condition in which a requested file has been broken up into blocks and these blocks are scattered around at different locations on a disk. Over time, fragmentation of files will increase on a disk as files are updated, added, and deleted. Eventually, without correction, fragmentation can significantly degrade the performance of the disk because each file has been broken up into numerous pieces.
When a file is broken up, the disk requires a plurality of input (I/O) disk operations in order to retrieve and assemble the data for a requested file. When it takes more than one disk operation to obtain the data for a fragmented file, this is known as a split transfer or split I/O. For every split transfer, the overhead of each disk I/O transfer is added. The more I/O requests, the longer user applications running on a host device must wait for I/O to be processed.
Unfortunately, fragmentation of a drive is not a simple problem. Files for different media types will have different sizes and different access characteristics by the application using that file. Accordingly, it would be desirable to provide methods and systems for storing and accessing files stored on a data storage device more efficiently.